package enterprise.manage.entity;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * Created by IntelliJ IDEA.
 * User: panxuanang
 * Date: 2010-12-9
 * Time: 14:13:11
 * Desc:
 */
@Entity
@org.hibernate.annotations.Entity(dynamicInsert = true, dynamicUpdate = true)
@Table(schema = "mpi",name="Log_ReturnTest")
public class ReturnTestLog {
    /**
     * id
     */
    private String id;
    /**
     * 商户编号
     */
    private String partnerNo;
    /**
     * 交易金额
     */
    private Double payMoney;
    /**
     * 订单状态
     */
    private Integer payResult;
    /**
     * 返回类型
     */
    private Integer returnType;
    /**
     * 商户自定义标识1
     */
    private String partnerMark1;
    /**
     * 商户自定义标识2
     */
    private String partnerMark2;
    /**
     * 商户订单号
     */
    private String orderId;
    /**
     * 返回地址
     */
    private String returnUrl;
    /**
     * 验证类型
     */
    private Integer validateType;
    /**
     * md5
     */
    private String md5;
    /**
     * 证书验证串
     */
    private String signString;
    /**
     * 返回参数
     */
    private String returnParams;
    /**
     * 返回码
     */
    private String responseCode;
    /**
     * 返回信息
     */
    private String responseMassage;
     /**
     * 是否抵达
     */
    private Integer delivered;
    /**
     * 备注
     */
    private String remark;

    @Id
    @Column(length = 50, nullable = false)
    @GeneratedValue(generator = "guid")
    @GenericGenerator(name = "guid", strategy = "guid")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPartnerNo() {
        return partnerNo;
    }

    public void setPartnerNo(String partnerNo) {
        this.partnerNo = partnerNo;
    }

    public Double getPayMoney() {
        return payMoney;
    }

    public void setPayMoney(Double payMoney) {
        this.payMoney = payMoney;
    }

    public Integer getPayResult() {
        return payResult;
    }

    public void setPayResult(Integer payResult) {
        this.payResult = payResult;
    }

    public Integer getReturnType() {
        return returnType;
    }

    public void setReturnType(Integer returnType) {
        this.returnType = returnType;
    }

    public String getPartnerMark1() {
        return partnerMark1;
    }

    public void setPartnerMark1(String partnerMark1) {
        this.partnerMark1 = partnerMark1;
    }

    public String getPartnerMark2() {
        return partnerMark2;
    }

    public void setPartnerMark2(String partnerMark2) {
        this.partnerMark2 = partnerMark2;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getReturnUrl() {
        return returnUrl;
    }

    public void setReturnUrl(String returnUrl) {
        this.returnUrl = returnUrl;
    }

    public Integer getValidateType() {
        return validateType;
    }

    public void setValidateType(Integer validateType) {
        this.validateType = validateType;
    }

    public String getMd5() {
        return md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public String getReturnParams() {
        return returnParams;
    }

    public void setReturnParams(String returnParams) {
        this.returnParams = returnParams;
    }

    public String getResponseCode() {
        return responseCode;
    }

    public void setResponseCode(String responseCode) {
        this.responseCode = responseCode;
    }

    public String getResponseMassage() {
        return responseMassage;
    }

    public void setResponseMassage(String responseMassage) {
        this.responseMassage = responseMassage;
    }

    public Integer getDelivered() {
        return delivered;
    }

    public void setDelivered(Integer delivered) {
        this.delivered = delivered;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getSignString() {
        return signString;
    }

    public void setSignString(String signString) {
        this.signString = signString;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ReturnTestLog that = (ReturnTestLog) o;

        if (delivered != null ? !delivered.equals(that.delivered) : that.delivered != null) return false;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (md5 != null ? !md5.equals(that.md5) : that.md5 != null) return false;
        if (orderId != null ? !orderId.equals(that.orderId) : that.orderId != null) return false;
        if (partnerMark1 != null ? !partnerMark1.equals(that.partnerMark1) : that.partnerMark1 != null) return false;
        if (partnerMark2 != null ? !partnerMark2.equals(that.partnerMark2) : that.partnerMark2 != null) return false;
        if (partnerNo != null ? !partnerNo.equals(that.partnerNo) : that.partnerNo != null) return false;
        if (payMoney != null ? !payMoney.equals(that.payMoney) : that.payMoney != null) return false;
        if (payResult != null ? !payResult.equals(that.payResult) : that.payResult != null) return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;
        if (responseCode != null ? !responseCode.equals(that.responseCode) : that.responseCode != null) return false;
        if (responseMassage != null ? !responseMassage.equals(that.responseMassage) : that.responseMassage != null)
            return false;
        if (returnParams != null ? !returnParams.equals(that.returnParams) : that.returnParams != null) return false;
        if (returnType != null ? !returnType.equals(that.returnType) : that.returnType != null) return false;
        if (returnUrl != null ? !returnUrl.equals(that.returnUrl) : that.returnUrl != null) return false;
        if (signString != null ? !signString.equals(that.signString) : that.signString != null) return false;
        if (validateType != null ? !validateType.equals(that.validateType) : that.validateType != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (partnerNo != null ? partnerNo.hashCode() : 0);
        result = 31 * result + (payMoney != null ? payMoney.hashCode() : 0);
        result = 31 * result + (payResult != null ? payResult.hashCode() : 0);
        result = 31 * result + (returnType != null ? returnType.hashCode() : 0);
        result = 31 * result + (partnerMark1 != null ? partnerMark1.hashCode() : 0);
        result = 31 * result + (partnerMark2 != null ? partnerMark2.hashCode() : 0);
        result = 31 * result + (orderId != null ? orderId.hashCode() : 0);
        result = 31 * result + (returnUrl != null ? returnUrl.hashCode() : 0);
        result = 31 * result + (validateType != null ? validateType.hashCode() : 0);
        result = 31 * result + (md5 != null ? md5.hashCode() : 0);
        result = 31 * result + (signString != null ? signString.hashCode() : 0);
        result = 31 * result + (returnParams != null ? returnParams.hashCode() : 0);
        result = 31 * result + (responseCode != null ? responseCode.hashCode() : 0);
        result = 31 * result + (responseMassage != null ? responseMassage.hashCode() : 0);
        result = 31 * result + (delivered != null ? delivered.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "ReturnTestLog{" +
                "id='" + id + '\'' +
                ", partnerNo='" + partnerNo + '\'' +
                ", payMoney=" + payMoney +
                ", payResult=" + payResult +
                ", returnType=" + returnType +
                ", partnerMark1='" + partnerMark1 + '\'' +
                ", partnerMark2='" + partnerMark2 + '\'' +
                ", orderId='" + orderId + '\'' +
                ", returnUrl='" + returnUrl + '\'' +
                ", validateType=" + validateType +
                ", md5='" + md5 + '\'' +
                ", signString='" + signString + '\'' +
                ", returnParams='" + returnParams + '\'' +
                ", responseCode='" + responseCode + '\'' +
                ", responseMassage='" + responseMassage + '\'' +
                ", delivered=" + delivered +
                ", remark='" + remark + '\'' +
                '}';
    }
}
